#include "texture_catalog.h"

using namespace krryn::view;

texture *texture_catalog::get_texture(const std::string &a_Filename){
	std::map<std::string, texture*>::iterator l_Texture = m_Textures.find(a_Filename);

	if(l_Texture == m_Textures.end()){
		texture *l_Texture = load_texture(a_Filename);
		m_Textures[a_Filename] = l_Texture;
		return l_Texture;
	}else{
		return l_Texture->second;
	}
}